module test_scheduler;

import dactor.scheduler;
import dactor.coroutine;
import std.stdio;

void fiber_test(int n) {
    while (true) {
        writefln("fiber_test(%d)", n);
        Coroutine.yield();
    }
}

void main() {
    foreach(int i; 0..10) {
        spawn(&fiber_test, i);
    }
    Scheduler.instance.run();
}

